package process

import (
	"encoding/json"
	"fmt"
	"go_code/chatroom/client/message"
)

func outputGroupMessage(msg *message.Message) {
	var smsMsg *message.SmsMessage

	_ = json.Unmarshal([]byte(msg.Data), &smsMsg)
	str := fmt.Sprintf(
		"用户 ID %d 对大家说：%s\n",
		smsMsg.UserId,
		smsMsg.Content,
		)

	fmt.Println(str)
}
